<template>
	<om-page :title="pageTitle">
	  <view class="page__bd" style='margin-top:10rpx;'>
		  <uni-list>
		  	<view v-for="(item, index) in commonData.datas" :key="index">
		  		<uni-list-item :data-index="index" :title="item.overtimeDate" :note="item.week" @click="infoTab(item)" :avatar="index+1" avatarBgColor="olive light" avatarSize="lg">
					<view slot="footer">
					  <view class="footer-cls">{{item.startTime + " - " + item.endTime}}</view>
					  <view class="footer-cls">{{item.salaryHandleName}}</view>
					</view>
				</uni-list-item>
		  	</view>
		  </uni-list>
	  </view>
	  <tui-loadmore :visible="commonData.loadding"></tui-loadmore>
	  <tui-nomore :visible="!commonData.pullUpOn"></tui-nomore>
	  <tui-scroll-top :scrollTop="scrollTop" style="background: rgba(124, 174, 255, 0.5)"></tui-scroll-top>
	</om-page>
</template>

<script>
	import listLoad from '../../../static/js/listLoad.js';
	const app = getApp()
	export default {
		data() {
			return {
				 logoColors: this.CuColorList,
				 scrollTop: 0,
				 commonData:{
					 datas:[]
				 },
				 pageTitle:""
			}
		},
		methods: {
			infoTab(item) {
				this.om.getFormInfoByFileCode(item.code, item.busCode);
			}
		},
		onLoad(options) {
			let _that = this
			this.pageTitle = options.title || "我的加班"
			uni.setNavigationBarTitle({
			  title: this.pageTitle
			})
			listLoad.initData(this,"wxAttend/getOvertimeList")
		},
		onPageScroll(e) {
			this.scrollTop = e.scrollTop;
		},
		//页面相关事件处理函数--监听用户下拉动作
		onPullDownRefresh: function() {
			listLoad.pullDownRefresh(this)
		},
		
		// 页面上拉触底事件的处理函数
		onReachBottom: function() {
			listLoad.reachBottom(this)
		}
	}
</script>

<style>

.om_hd_search {
  width: 100%;
  height: 80rpx;
  padding-bottom: 10rpx;
}

.footer-cls{
  font-size: 28rpx;
}

</style>
